import { BasicColumn, BasicTable, FormSchema, useTable } from "@/components/Table";
import { useTranslation } from "react-i18next";
import Toolbar from "@/components/ViewComponents/Toolbar";
const index = () => {
	const { t } = useTranslation();
	const searchFormSchema: FormSchema[] = [
		{
			label: t("felix_ui.pat_cardno"),
			field: "patCardno",
			component: "Input"
		},
		{
			label: t("felix_ui.full_name"),
			field: "fullName",
			component: "Input"
		},
		{
			label: t("felix_ui.dt_date"),
			field: "dtDate",
			component: "DatePicker"
		},
		{
			label: t("felix_ui.dept_name"),
			field: "deptName",
			component: "Input"
		},
		{
			label: t("felix_ui.address"),
			field: "address",
			component: "Input"
		}
	];
	const columns: BasicColumn[] = [
		{
			title: t("felix_ui.pat_cardno"),
			dataIndex: "patCardno"
		},
		{
			title: t("felix_ui.full_name"),
			dataIndex: "fullName"
		},
		{
			title: t("felix_ui.time_of_arrival"),
			dataIndex: "timeOfArrival"
		},
		{
			title: t("felix_ui.noLoad"),
			dataIndex: "noLoad"
		},
		{
			title: t("kevin_ui.date_of_waiver"),
			dataIndex: "dateOfWaiver"
		},
		{
			title: t("felix_ui.salary"),
			dataIndex: "salary"
		},
		{
			title: t("felix_ui.staff"),
			dataIndex: "staff"
		},
		{
			title: t("kevin_ui.type_of_object"),
			dataIndex: "typeOfObject"
		},
		{
			title: t("kevin_ui.issuedate"),
			dataIndex: "issuedate"
		},
		{
			title: t("felix_ui.flatline"),
			dataIndex: "flatline"
		},
		{
			title: t("felix_ui.usingThreads"),
			dataIndex: "usingThreads"
		},
		{
			title: t("kevin_ui.residence_certificate"),
			dataIndex: "residenceCertificate"
		},
		{
			title: t("felix_ui.transferDocument"),
			dataIndex: "transferDocument"
		},
		{
			title: t("felix_ui.from"),
			dataIndex: "from"
		},
		{
			title: t("felix_ui.to"),
			dataIndex: "to"
		},
		{
			title: t("felix_ui.fam_relatives"),
			dataIndex: "famRelatives"
		},
		{
			title: t("kevin_ui.approval_date"),
			dataIndex: "approvalDate"
		},
		{
			title: t("kevin_ui.renewal_date"),
			dataIndex: "renewalDate"
		}
	];
	const getList = () => {
		return [
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			},
			{
				fullName: "Felix",
				patCardno: "12345676543",
				timeOfArrival: "2024-1-1",
				noLoad: "LENGEND",
				dateOfWaiver: "2025-8-8",
				salary: "Renger",
				staff: "5455456",
				typeOfObject: "dsagffs",
				issuedate: "42342354452432",
				flatline: "JOK",
				usingThreads: "JECK",
				residenceCertificate: "dasffsdsf",
				transferDocument: "fhkjsdhfjklh",
				from: "2021-01-02",
				to: "2025-01-13",
				famRelatives: "iloveYOU",
				approvalDate: "BABY",
				renewalDate: "dsfgfddfsa"
			}
		];
	};
	const [registerTable] = useTable({
		dataSource: getList(),
		columns,
		formConfig: {
			labelWidth: 120,
			schemas: searchFormSchema,
			showActionButtonGroup: true,
			showAdvancedButton: false,
			baseColProps: { span: 6 }
		},
		useSearchForm: true
		// rowSelection: { type: "checkbox" }
	});
	return (
		<div className="page">
			<div className="page-content block">
				<BasicTable register={registerTable}></BasicTable>
			</div>
			<Toolbar btnList={[{ key: "save", disabled: true }]} />
		</div>
	);
};
export default index;
